/**
 * 服务端API请求地址
 * Created by zlp on 2018-6-6.
 */
//
const base_url = "http://172.7.0.205:8080/sun_fund_api/";//测试地址
//   const base_url = "http://172.7.1.178:8080/";//小宋
// const base_url = "http://172.7.0.77:8080/";//郭杰



const version = "api/v1/";
module.exports = {
    //请求方法
    request_types: {
        GET: 'get',
        POST: 'POST',
        PUT: 'PUT',
        DELETE: 'DELETE'
    },
    //<公共接口>
    common: {
        email_unique: base_url + "common/v1/email_unique",             //验证email唯一性 get
        send_email_verify_code: base_url + "common/v1/verify_code",    //获取验证码到邮箱 get
        get_rate: base_url + "common/v1/rate",                         //获取汇率 get
        upload_img: base_url + "common/v1/images",                     //上传图片 post
        get_img: base_url + "common/v1/images/",                       //获取图片 get
        get_img_liu: base_url + "common/v1/images/",                   //获取图片 get
    },
    //#登录
    login: {
        login: base_url + "login",                          //登入
        logout: base_url + "logout",                        //登出
        setting: base_url + version + "setting"             //设置
    },

    //系统管理
    auth: {
        user: base_url + version + "user",                  //用户管理
        resource: base_url + version + "resource",          //资源管理
        role: base_url + version + "role",                  //角色管理
        role_update: base_url + version + "role/update",    //角色管理
        online: base_url + version + "online",              //在线用户
        operation: base_url + version + "log/operation",    //行为日志
        parameter: base_url + version + "system_setting",        //系统参数
        history: base_url + version + "system_setting/sys_setting_history",        //历史记录
    },

    //业绩查询
    achievement:{
        list: base_url + version + "admin/achievement/list",        //业绩列表
        export: base_url + version + "admin/achievement/export"        //业绩列表导出
    },

    //合同管理
    contract: {
        contract_list: base_url + version + "admin/contract",         //列表
        sale_org_name: base_url + version + "admin/organization/sales_hr/sale_org_name",         //销售姓名模糊查询列表
        pending_list: base_url + version + "admin/contract/list_review",         //get 待审核列表
    },

    sales: {
        sale: {
            list: base_url + version + 'admin/sales',                   //销售列表
            info: base_url + version + 'admin/sales/info',              //销售基本信息
            customer: base_url + version + 'admin/sales/customer',      //销售的客户列表
            ib: base_url + version + 'admin/sales/ib',                  //销售的代理

            commission: base_url + version + 'admin/sales/commission',   //返佣
            rebate: base_url + version + 'admin/sales/rebate',           //返利

            reward: base_url + version + 'admin/sales/reward',           //提成
        },
        organization: {
            list: base_url + version + 'admin/organization',                        // 获取资源树
            company : base_url + version + 'admin/organization/company',            // 添加/删除/修改  公司
            department : base_url + version + 'admin/organization/department',      // 添加/删除/修改  部门
            team : base_url + version + 'admin/organization/team',                  // 添加/删除/修改  组别
        },
        hr: {
            list: base_url + version + 'admin/organization/sales_hr',               //人员列表
            add: base_url + version + 'admin/organization/sales_hr/add',            //添加销售
            info: base_url + version + 'admin/organization/sales_hr/info',          //销售基本信息
            remove: base_url + version + 'admin/organization/sales_hr/remove',      //删除销售
            update: base_url + version + 'admin/organization/sales_hr/update',      //更新销售
            update_password: base_url + version + 'admin/organization/sales_hr/update_password',      //更新销售密码
            pause: base_url + version + 'admin/organization/sales_hr/pause_sales',           //停用销售
            resume: base_url + version + 'admin/organization/sales_hr/resume_sales',           //停用销售
        }
    },


    //客户列表
    customer:{
        list: base_url + version + "admin/customer/list",        //客户列表
        info: base_url + version + "admin/customer/info/",        //客户详情
        export: base_url + version + "admin/customer/export"        //客户列表导出
    },

    //产品列表
    product:{
        list: base_url + version + "admin/product/list",        //产品列表
        add: base_url + version + "admin/product/add",        //添加新产品
        disable: base_url + version + "admin/product/disabled/",        //停用产品
        enable: base_url + version + "admin/product/enable/",        //启用产品
        update: base_url + version + "admin/product/update",        //编辑产品
        info: base_url + version + "admin/product/info/"        //产品详情
    },
}


